package Library.Game;

import java.rmi.*;
import java.util.*;

/**
 *
 */
public interface IClientService extends Remote
{
    // Unused Callback Events
    /**
     *
     * @param aantal
     * @param landvanId
     * @param landnaarId
     * @throws RemoteException
     * @throws Exception
     */
    public void onMoveArmies(int aantal, int landvanId, int landnaarId) throws RemoteException, Exception;
    
    
    // Used Callback Events
    /**
     *
     * @param player
     * @throws RemoteException
     * @throws Exception
     */
    public void onGameTurnChanged(IPlayer player) throws RemoteException, Exception;
    /**
     *
     * @param message
     * @throws RemoteException
     * @throws Exception
     */
    public void onMessage(String message) throws RemoteException, Exception;
    /**
     *
     * @param status
     * @throws RemoteException
     * @throws Exception
     */
    public void onGameStatusChanged(int status) throws RemoteException, Exception;
    /**
     *
     * @param player
     * @throws RemoteException
     * @throws Exception
     */
    public void onPlayerJoined(IPlayer player) throws RemoteException, Exception;
    /**
     *
     * @param player
     * @throws RemoteException
     * @throws Exception
     */
    public void onPlayerLeft(IPlayer player) throws RemoteException, Exception;
    /**
     *
     * @param landId
     * @param plr
     * @throws RemoteException
     * @throws Exception
     */
    public void onSetLandOwner(int landId, IPlayer plr) throws RemoteException, Exception;
    /**
     *
     * @param player
     * @param decission
     * @throws RemoteException
     * @throws Exception
     */
    public void onPlayerDecided(IPlayer player, int decission) throws RemoteException, Exception;
    /**
     *
     * @param time
     * @param totaltime
     * @throws RemoteException
     * @throws Exception
     */
    public void onPlacementTimerEvent(int time, int totaltime) throws RemoteException, Exception;
    /**
     *
     * @param time
     * @param totaltime
     * @throws RemoteException
     * @throws Exception
     */
    public void onGameTimerEvent(int time, int totaltime) throws RemoteException, Exception;
    /**
     *
     * @param time
     * @param totaltime
     * @throws RemoteException
     * @throws Exception
     */
    public void onTurnTimerEvent(int time, int totaltime) throws RemoteException, Exception;

    /**
     *
     * @param amount
     * @param bonusAmount
     * @throws RemoteException
     * @throws Exception
     */
    public void onUpdateAvailableArmies(int amount, int bonusAmount) throws RemoteException, Exception;
   
    
    /**
     *
     * @param time
     * @param totaltime
     * @throws RemoteException
     * @throws Exception
     */
    public void onDefendTimerEvent(int time, int totaltime) throws RemoteException, Exception;
    
    /**
     * Event dat wordt getriggerd als een speler nieuwe legers erbij krijgt of verlies.
     * @param player speler wie het overkomt
     * @param landID land waar het overkomt
     * @param totalArmies totaal nadat dit overkomen is
     * @param newArmies aantal in delta
     * @throws RemoteException
     * @throws Exception 
     */
    public void onArmiesPlaced(IPlayer player, int landID, int totalArmies, int newArmies) throws RemoteException, Exception;
    /**
     *
     * @param attPlayer
     * @param attLandId
     * @param attDices
     * @param lostAttArmies
     * @param defPlayer
     * @param defLandId
     * @param defDices
     * @param lostDefArmies
     * @throws RemoteException
     * @throws Exception
     */
    public void onAttack(IPlayer attPlayer, int attLandId, List<Integer> attDices, int lostAttArmies,
			 IPlayer defPlayer, int defLandId, List<Integer> defDices, int lostDefArmies)
			 throws RemoteException, Exception;
    
    /**
     *
     * @param attacker
     * @param attLandID
     * @param amount
     * @param defLandID
     * @param recDefAmount
     * @throws RemoteException
     * @throws Exception
     */
    public void onDefending(IPlayer attacker, int attLandID, int amount, int defLandID, int recDefAmount) throws RemoteException, Exception;
}
